Carbon


SetDefaultComponent

Header: Components.h Carbon status: Supported

Changes the search order for registered components.

OSErr SetDefaultComponent (
    Component aComponent, 
    SInt16 flags
);
Parameter descriptions
aComponent

The component which you wish moved to the front of the search chain. The order of the search chain influences which component the Component Manager selects in response to an application’s use of the OpenDefaultComponent and FindNextComponent functions. You can use a component instance here, but you must coerce the data type appropriately.

flags

A value specifying the control information governing the operation. The value of this parameter controls which component description fields the Component Manager examines during the reorder operation. Set the appropriate flags to 1 to define the fields that are examined during the reorder operation. See “Set Default Component Flags” for a description of the values you can use here.

function result

A result code.

DISCUSSION

Note that this function changes the search order for all applications. As a result, you should use this function carefully.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)